/**
 * 
 */
package com.android.zing;

/**
 * @author trangdoan
 *
 */
public class ZME_Error extends Throwable {
	
	//define error code for OAuth-2.0
	public static final int ZOAUTH_ERR_AUTHORIZED_CODE_INVALID = -1;
	public static final int ZOAUTH_ERR_AUTHORIZED_CODE_EXPIRED = -2;
	public static final int ZOAUTH_ERR_AUTHORIZED_CODE_MISSING = -3;
	public static final int ZOAUTH_ERR_UNKNOWN_APPLICATION = -4;
	public static final int ZOAUTH_ERR_WRONG_VALIDATE_APLLICATION = -5;
	public static final int ZOAUTH_ERR_USER_HAD_LOGGED_OUT = -6;	
	public static final int ZOAUTH_ERR_ACCESSTOKEN_EXPIRED = -13;
	

    private static final long serialVersionUID = 1L;

    private int mErrorCode = 0;
    private String mErrorType;

    public ZME_Error(String message) {
        super(message);
    }
    
    public ZME_Error(String message, int code ) {
    	super(message);
    	mErrorType = "-1";
        mErrorCode = code;
    }

    public ZME_Error(String message, String type, int code) {
        super(message);
        mErrorType = type;
        mErrorCode = code;
    }

    public int getErrorCode() {
        return mErrorCode;
    }

    public String getErrorType() {
        return mErrorType;
    }

}
